export default function () {
  return this.createNode({
    shape: 'custom-electric',
    width: 12,
    height: 40,
    markup: [
      {
        tagName: 'g',
        selector: 'left-group',
        children: [
          {
            tagName: 'rect',
            selector: 'left',
            groupSelector: 'line',
            attrs: {
              x: 6,
              y: 0
            }
          },
          {
            tagName: 'circle',
            selector: 'lco',
            groupSelector: 'co',
            attrs: {
              cx: 6,
              cy: 12
            }
          }
        ]
      },
      {
        tagName: 'rect',
        selector: 'switch',
        groupSelector: 'line'
      },
      {
        tagName: 'g',
        selector: 'right-group',
        children: [
          {
            tagName: 'rect',
            selector: 'right',
            groupSelector: 'line',
            attrs: {
              x: 6,
              y: 31
            }
          },
          {
            tagName: 'circle',
            selector: 'rco',
            groupSelector: 'co',
            attrs: {
              cx: 6,
              cy: 27
            }
          }
        ]
      }
    ],
    attrs: {
      line: {
        width: 0.1,
        height: 9
      },
      co: {
        r: 3,
        strokeWidth: 2
      },
      switch: {
        x: 4,
        y: 23,
        width: 0.1,
        height: 14,
        transform: 'rotate(165 4 23)'
      }
    },
    ports: {
      items: [
        {
          group: 'top'
        },
        {
          group: 'bottom'
        }
      ]
    }
  })
}
